export const tags = [
  { category: 'bots', id: 0, name: 'Модерация', showInMainList: true },
  { category: 'bots', id: 1, name: 'Комбайн', showInMainList: true },
  { category: 'bots', id: 2, name: 'Утилиты', showInMainList: true },
  { category: 'bots', id: 3, name: 'Фан', showInMainList: true },
  { category: 'bots', id: 4, name: 'Музыка', showInMainList: true },
  { category: 'bots', id: 5, name: 'Экономика', showInMainList: true },
  { category: 'bots', id: 6, name: 'Логи', showInMainList: false },
  { category: 'bots', id: 7, name: 'Уровни', showInMainList: false },
  { category: 'bots', id: 8, name: '18+', showInMainList: false },
  { category: 'bots', id: 9, name: 'Настройка', showInMainList: false },
  { category: 'bots', id: 10, name: 'Role-Play', showInMainList: false },
  { category: 'bots', id: 11, name: 'Мемы', showInMainList: false },
  { category: 'bots', id: 12, name: 'Игры', showInMainList: false },
  { category: 'bots', id: 13, name: 'AI', showInMainList: false },
  { category: 'servers', id: 130, name: 'Общение', showInMainList: true },
  { category: 'servers', id: 131, name: 'Фан', showInMainList: true },
  { category: 'servers', id: 132, name: 'Игры', showInMainList: true },
  { category: 'servers', id: 133, name: 'Кино', showInMainList: true },
  { category: 'servers', id: 134, name: 'Аниме', showInMainList: true },
  { category: 'servers', id: 135, name: 'Искусство', showInMainList: true },
  { category: 'servers', id: 136, name: 'Кодинг', showInMainList: true },
  { category: 'servers', id: 137, name: 'Музыка', showInMainList: false },
  { category: 'servers', id: 138, name: '18+', showInMainList: false },
  { category: 'servers', id: 139, name: 'Role-Play', showInMainList: false },
  { category: 'servers', id: 140, name: 'Юмор', showInMainList: false },
  { category: 'servers', id: 160, name: 'Genshin', showInMainList: false },
  { category: 'servers', id: 161, name: 'Minecraft', showInMainList: false },
  { category: 'servers', id: 162, name: 'GTA', showInMainList: false },
  { category: 'servers', id: 163, name: 'CS', showInMainList: false },
  { category: 'servers', id: 164, name: 'Dota', showInMainList: false },
  { category: 'servers', id: 165, name: 'Among Us', showInMainList: false },
  { category: 'servers', id: 166, name: 'Fortnite', showInMainList: false },
]

export const serverTags = new Map(tags
  .filter(e => e.category === 'servers')
  .map(e => [ e.name.toLowerCase(), e.id ]))

export const botTags = new Map(tags
  .filter(e => e.category === 'bots')
  .map(e => [ e.name.toLowerCase(), e.id ]))

export const parseTags = (input: string, map: Map<string, number>) =>
  input
    .split(',')
    .map(e => map.get(e.trim()))
    .filter(e => e !== undefined)
    .map(e => e as number)
